<div id="bd">
  <div id="yui-main">
    <div class="yui-b">

	<h2 id="chapter-title">目录</h2>
	<ol class="toc">
	<?php
		$_i = 0;
		foreach($tableOfContents as $chapter) :
			if ($chapter['isShow']==0) continue;
			if ($_i % 2 ==0) $_class='a'; else $_class='b';
	?>
		<li class="<?php echo $_class;?>">
				<span class="hits">(<?php echo $chapter['hits'];?>)</span>
				<?php if ($chapter['sectionShow']==1) : ?>
				<span class="release-date"><?php echo AppHelper::getChapterReleaseDate($bookId, $chapter['chapterId']);?></span>
				<?php else : ?>
				<span class="release-date">----/--/--</span>
				<?php endif; ?>
				<?php echo CHtml::link($chapter['chapterName'], Yii::app()->createUrl('book/default/chapter', array('bookFlag'=>$bookFlag, 'chapterFlag'=>$chapter['url'])));?>
		</li>
	<?php
			$_i++;
		endforeach;
	?>
        </ol>
    </div>
  </div>
</div>
